import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    isLeftMenuCollapse: false,
    equipmentData: [],
    areasData: [],
    sid: "",
    gw_id: "",
    send_list: [],
  },
  getters: {},
  mutations: {
    setAreasData(state, payload) {
      state.areasData = payload;
    },
    setSidData(state, sid) {
      state.sid = sid;
    },
  },
  actions: {
    vuexLogin({ commit }, sid) {
      commit("setSidData", sid);
    },
  },
  modules: {},
});
